<h4>{{ 'AbpAccount::ResetPassword' | abpLocalization }}</h4>

<form
  *ngIf="!isPasswordReset; else passwordResetTemplate"
  [formGroup]="form"
  [mapErrorsFn]="mapErrorsFn"
  (ngSubmit)="onSubmit()"
  validateOnSubmit
>
  <p>{{ 'AbpAccount::ResetPassword_Information' | abpLocalization }}</p>
  <div class="mb-3 form-group">
    <label for="input-password" class="form-label">{{
      'AbpAccount::Password' | abpLocalization
    }}</label
    ><span> * </span>
    <input type="password" id="input-password" class="form-control" formControlName="password" />
  </div>
  <div class="mb-3 form-group">
    <label for="input-confirm-password" class="form-label">{{
      'AbpAccount::ConfirmPassword' | abpLocalization
    }}</label
    ><span> * </span>
    <input
      type="password"
      id="input-confirm-password"
      class="form-control"
      formControlName="confirmPassword"
    />
  </div>
  <button class="me-2 btn btn-outline-primary" type="button" routerLink="/account/login">
    {{ 'AbpAccount::Cancel' | abpLocalization }}
  </button>
  <abp-button
    buttonType="submit"
    buttonClass="me-2 btn btn-primary"
    [loading]="inProgress"
    (click)="onSubmit()"
  >
    {{ 'AbpAccount::Submit' | abpLocalization }}
  </abp-button>
</form>

<ng-template #passwordResetTemplate>
  <p>
    {{ 'AbpAccount::YourPasswordIsSuccessfullyReset' | abpLocalization }}
  </p>

  <a routerLink="/account/login">
    <button class="d-block mt-2 mb-3 btn btn-primary">
      {{ 'AbpAccount::BackToLogin' | abpLocalization }}
    </button>
  </a>
</ng-template>
